home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / appkit.695 < prev    next >
Text File  |  1992-02-06  |  2KB  |  49 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fswiss Helvetica;}
  2. \paperw12740
  3. \paperh8500
  4. \margl120
  5. \margr120
  6. {\colortbl\red0\green0\blue0;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ul0\fs28 Appkit View setFlipped\
  8.     \
  9. Q:  
  10. \fc0 Why does my View lose its TIFF image after I made a call to 
  11. \b setFlipped
  12. \b0 ? This is what I did, and the results I got.\
  13.  
  14. \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 \
  15. Description:\
  16.     1.    Create a viewScroller\
  17.     2.    Create an imageView\
  18.     3.    [viewScroller setDocView: imageView];\
  19.     4.    [imageView setFlipped:YES];\
  20.     5.    load tiff file into imageView\
  21.     6.    [imageView display];\
  22. \
  23. Results:\
  24.     1.    Without the setFlipped: call, my TIFF image shows up fine, with\
  25.         the scrollers sized respective to the imageView.\
  26.     2.    With the setFlipped: call, my TIFF image DOES NOT show up,\
  27.         BUT the scrollers are sized respective to the imageView\
  28.         AND the y-axis scrollbar shows at the top (like it should be).\
  29. \
  30.  
  31. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600 A: 
  32. \fc0  
  33. \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 If you composite your 
  34. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 TIFF 
  35. \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 image at the point (0,0), after flipping the view, you won't see anything because the image is in fact now off-screen, i.e. showing at the top left corner
  36. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0  
  37. \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 (imagine the image height going beyond the y axis 
  38. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 —
  39. \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0  growing upward).
  40. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0  
  41. \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 However, if you composite at the point (0, height of view rectangle), the image will be shown at the lower left corner. Now, if you composite at the point (0, height of the image), the image will be shown as hanging from the top left corner.\
  42.  
  43. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 \
  44. Valid for 2.0\
  45. \
  46. QA695\
  47. \
  48.  
  49.